<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{admin/common/common}">
<head>
    <title>鉴权</title>
</head>

<body layout:fragment="content">
<form id="myForm" th:action="@{/auth/list}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            <input type="text" class="input-text" style="width:150px" placeholder="输入用户名称" name="name" th:value="${name}"/>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜索
            </button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l">
				<a sa:hasPermission="auth:add" href="javascript:;" th:onclick="'javascript:layer_show(\'添加用户\',\'/auth/add\',\'800\',\'300\');'" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>
			</span>
		</div>
        <table class="table table-border table-bordered table-bg table-hover">
            <thead>
            <tr>
                <th scope="col" colspan="7">鉴权列表</th>
            </tr>
            <tr class="text-c">
                <th>身份标识</th>
                <th>用户名称</th>
                <th>用户密码</th>
                <th>用户类型</th>
                <th>描述</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="model:${pageInfo?.result}" th:object="${model}">
                <td th:text="*{id}">d</td>
                <td th:text="*{name}">d</td>
                <td th:text="*{password}">d</td>
                <td>
                  <span th:if="*{userType} eq 1">应用用户</span>
                  <span th:if="*{userType} eq 0">边缘用户</span>
                </td>
                <td th:text="*{description}">d</td>
            </tr>
            </tbody>
        </table>
        <div th:replace="admin/common/page :: page"></div>
    </div>
</form>

<script type="text/javascript" th:src="@{/js/common/page.js}"></script>
<script th:inline="javascript">
</script>
</body>
</html>